package cn.hd.userService.config;

import cn.hd.swaggerService.config.SwaggerConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spring.web.plugins.Docket;

@Configuration
public class ApiGroupConfig {

    @Autowired
    SwaggerConfig swaggerConfig;

    @Bean
    public Docket createRestApi() {
        SwaggerConfig.DocketBuilder docketBuilder = swaggerConfig.docketBuilder();
        ApiInfo apiInfo = docketBuilder.buildApiInfo("userService", "用户服务", "v1.0");
        return docketBuilder.createBaseDocket(apiInfo, "userService","cn.hd.userService");
    }
}
